enum direction {
  up,
  down,
  left,
  right,
}

//常量枚举 ，可以提升性能，它只会编译为逻辑部分的js代码
const enum LIKE {
  RED = 'red',
  GREEN = 'green'
}

const value:string = 'red';

if(value === LIKE.RED) {
  console.log(`i like ${value}`)
}

console.log(direction.up)